package com.yidu.hbatsams.service.TrainingPlan;

import com.yidu.hbatsams.dao.AtsEmpAthleteSchemeMapper;
import com.yidu.hbatsams.domain.AtsEmpAthleteScheme;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;


/**
 * @program: hbats
 * @description 运动员计划关联Service
 * @author: 朱星润
 * @create: 2019-11-05 08:52
 **/
@Service
public class AtsEmpAthleteSchemeServiceimpl implements AtsEmpAthleteSchemeService{
    @Resource
    AtsEmpAthleteSchemeMapper atsEmpAthleteSchemeMapper;//运动员计划关联
    @Override

    /**
     * 增加
     */
    public int insertSelective(AtsEmpAthleteScheme record) {
        record.setIsva(1);//有效
        record.setCreatTime(new java.sql.Date(new Date().getTime()));//当前时间
        return atsEmpAthleteSchemeMapper.insertSelective(record);
    }

    /**
     * 计划id查询
    * @param atsEmpAthleteScheme
     * @return
     */
    @Override
    public List<AtsEmpAthleteScheme> findByRemark(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.findByRemark(atsEmpAthleteScheme);
    }

    /**
     * 逻辑删除
     * @param atsEmpAthleteScheme
     * @return
     */
    @Override
    public int updateRemark(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updateRemark(atsEmpAthleteScheme);
    }

}